import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {RouteReuseStrategy} from '@angular/router';

import {IonicModule, IonicRouteStrategy} from '@ionic/angular';
import zh from '@angular/common/locales/zh';
import {AppRoutingModule} from './app-routing.module';
import {AppComponent} from './app.component';
import {AlertComponent} from "./unit/alert";
import {PublicModule} from "./components/public.module";
import {BasicService} from "./unit/basic-service";
import {HTTP_INTERCEPTORS, HttpClientModule} from "@angular/common/http";
import {PdfViewerModule} from "ng2-pdf-viewer";
import {AuthInterceptor} from "./unit/auth-interceptor";
// import {BarcodeScanner} from "@ionic-native/barcode-scanner/ngx";
import {BarcodeScanner} from "@awesome-cordova-plugins/barcode-scanner/ngx";
import {NgxSummernoteModule} from "ngx-summernote";
import {registerLocaleData} from "@angular/common";
// import {QRScanner} from "@ionic-native/qr-scanner";
registerLocaleData(zh);
    @NgModule({
        declarations: [AppComponent],
        entryComponents: [],
        imports: [BrowserModule,
            IonicModule.forRoot(),
            AppRoutingModule,
            HttpClientModule,
            PdfViewerModule,
            PublicModule,
            NgxSummernoteModule,
        ],
        providers: [
            {provide: RouteReuseStrategy, useClass: IonicRouteStrategy},
            {provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true},
            AlertComponent,
            // Camera,
            BarcodeScanner,
        // QRScanner,
        BasicService],
    bootstrap: [AppComponent],
    exports: []
})
export class AppModule {
}
